﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace CapaPresentacion.Vistas
{
    /// <summary>
    /// Lógica de interacción para Error.xaml
    /// </summary>
    public partial class VentanaAviso : Window
    {
        public VentanaAviso()
        {
            InitializeComponent();
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;

        }

        public VentanaAviso(bool esError, string titulo, string mensaje)
        {
            InitializeComponent();
            this.Title = titulo;
            this.etiqueta.Content = mensaje;
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;

            if (!esError)
            {
                this.imagen.Source = new BitmapImage(new Uri("pack://application:,,,/Imagenes/Correcto.ico") );

            }
                       
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

       

    }
}
